package router

import (
	"database/sql"

	"gitee.com/hp-huiw/family-expense-api/internal/handler"
	"github.com/gin-gonic/gin"
)

// Sets routes for incomeExpenseAnalysis resource.
func SetIncomeExpenseAnalysisRoutes(routerGroup *gin.RouterGroup, db *sql.DB) {
	h := handler.NewIncomeExpenseAnalysisHandler(db)

	routerGroup.GET("/query-existing-distinct-years", h.QueryExistingDistinctYears)
	routerGroup.GET("/query-summary-by-existing-years", h.QuerySummaryByExistingYears)
	routerGroup.GET("/query-annual-monthly-summary", h.QueryAnnualMonthlySummary)
	routerGroup.GET("/query-overall-summary", h.QueryOverallSummary)
	routerGroup.GET("/query-monthly-daily-summary", h.QueryMonthlyDailySummary)
	routerGroup.GET("/query-top-rank-by-account-group", h.QueryTopRankByAccountGroup)
	routerGroup.GET("/query-summary-by-detail-type", h.QuerySummaryByDetailType)
}
